package com.zjy.software.day13;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class CollectionsDemo {
    public static void main(String[] args)
    {
    	List list= Arrays.asList(1,2,3,5,7,2,4);

        Collections.sort(list);
        System.out.println("list = " + list);

        //打乱集合的顺序,类似于洗牌
        Collections.shuffle(list);
        System.out.println("list = " + list);

        Collections.reverse(list);
        System.out.println("list = " + list);

        Collections.replaceAll(list,2,9);
        System.out.println("list = " + list);


    }
}
